<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./demo12.js"></script>
</head>

<body>
    <!---form表单的js操作--->
    <form action="http://127.0.0.1:5500/work12/zjr.html"  method="get">
         <input id="user_n" type="text" name="账号" placeholder="请输入用户名">
        <br>
        <input type="password" name="密码" value="123456">
        <br>
        <input type="checkbox" id="male">男
        <input type="checkbox" id="female">女

        <select id="fruit">
            <option value="001">香蕉</option>
            <option value="002">苹果</option>
            <option value="003">葡萄</option>
            <option value="004">柠檬</option>
            <option value="005">柚子</option>
        </select>
        <br>
        <button typr="button">不要点我</button>
        <button type="submit">提交</button>
    </form>
    <br>
    <br>
    <br>
    <br>
    <div>-----------------------------</div>
    <br>
    <br>
    <br>
    <br>
    <div>下面是POST</div>
    <form action="http://127.0.0.1:8080/test" method="post" id="postForm">

        <input id="post_user" type="text" name="post_user" placeholder="请输入用户名">
        <br>
        <input type="password" name="post_password" value="123456">
        <br>
        <input type="checkbox" id="post_male">男
        <input type="checkbox" id="post_female">女

        <select id="post_fruit">
            <option value="001">香蕉</option>
            <option value="002">苹果</option>
            <option value="003">葡萄</option>
            <option value="004">柠檬</option>
            <option value="005">柚子</option>
        </select>
        <br>
        <button type="button">不要点我</button>
        <button type="submit">提交</button>
    </form>

    <!-- 放在 POST 表单下方或其他你看得见的位置 -->
    <div id="result" style="white-space: pre; background:#f4f4f4; padding:10px;"></div>

</body>
</html>